The present invention relates to image processing systems, and in particular to image processing systems for tonal correction of images.
Image processing systems typically include an input device for generating an electronic representation of an image. The input device provides the electronic image representation to a computer workstation which processes the image in accordance with a user's instructions and forwards the processed image to a high resolution monitor for display. The user interacts with the workstation, repeatedly instructing it to adjust the electronic image until the monitor displays a desired image. The user can also generate a hard copy of the image by instructing the workstation to provide the processed electronic image to a selected printing device.
An exemplary image processing system is shown in FIG. 1. In this Figure, an image is input to the system by scanning hardcopy with scanner 10. Scanner 10 may be any suitable color or black-and-white scanner, such as a Macintosh-compatible scanner capable of producing 24-bit RGB files. Alternatively, the image may be input through a disk storage unit 12 such as the Kodak PhotoCD system. Images may also be input directly from video cameras and other image sensing devices.
The scanner may generate an image file using a suitable workstation 14 such as a Macintosh II/fx or Macintosh Quadra. The computer typically has a math coprocessor chip. Using the workstation, the overall image may be positioned, scaled and cropped with suitable page composition software such as Aldus PageMaker, Quark XPress, or Letraset Design Studio.
The image also may be processed on an appropriate imaging station 16 such as a Kodak PCS100 workstation, which is built around a Macintosh Quadra 900 platform equipped with a Kodak Precision Color Transform Engine. The PCS100 also uses a 24-bit color graphics card such as the SuperMac Thunder/24 card and color display calibration hardware. Using the PCS100, the operator can make use of the advanced photo editing toolset of the Adobe PhotoShop system.
The image processed by imaging station 16 may be sent to a proofer 20 for hardcopy output. The proofer may be any suitable compatible with the imaging station. Preferably, data interchange between the imaging station and the proofer is accomplished in a four color separation format such as DCS CMYK format, EPS CMYK format, or Scitex CT format.
While an image may be processed as above, it may also be sent to a suitable publishing system 18 such as the Kodak Prophecy system, which is built around an image accelerator-equipped Sun SPARC platform. The publishing system allows the operator to "soft-proof" the image by correcting the image to compensate for printing characteristics and by manipulating the image characteristics with a set of easily understood icons. Using the Prophecy system, an operator can perform many image manipulation operations such as tone and contrast correction, cast removal, image sharpening and blurring, silhouetting, selective color changes, cloning, masking, image rotation, and OPI substitution.
The electronic image processed by the workstation consists of a two-dimensional array of picture elements (pixels). Each pixel may be represented in any of a variety of color notations or "color spaces". For example, the RGB color space represents pixel according to the relative contributions of three primary colors, red, green, and blue. This notation is commonly used by color monitors since the three parameters (R, G, and B) correspond to the mechanism by which the monitor generates color. More specifically, each pixel of the monitor's display contains a red phosphor, a green phosphor, and a blue phosphor. To generate a color defined by a set of RGB values, the monitor stimulates each primary phosphor with an intensity determined by the appropriate pixel's corresponding RGB value.
Similarly, the CMYK space represents color using four variables, C, M, Y, K, each corresponding to the relative (subtractive) contribution of the colorants, cyan, magenta, yellow and black. This representation is commonly used by printing devices since each parameter C, M, Y and K determines the amount of a colorant (e.g., ink or dye) used by the printer in producing a desired color. Notations such as RGB and CMYK are useful for image scanning devices and image printing devices, respectively, since each parameter of the space closely corresponds to a physical mechanism by which these devices measure and generate color.
These spaces may not be well-suited for processing images. For example, as shown in FIG. 2, the three parameters R, G and B define a three dimensional space with each point within the space corresponding to a unique color combination. At various points within the space, a selected change in the values of the parameters may not result in a commensurate change in the perceived color. For example, at a location in the space having a high R parameter value, increasing the parameter R by n units might yield little perceived change in color. Yet, at another point in the space having a relatively low R parameter value, an increase of the same n units yields a dramatic change in the perceived color. Accordingly, it may be difficult for a user to manipulate the primaries R, G, B to achieve a desired change in color.
In response to this problem, a variety of perceptually-based spaces have been proposed for defining colors in terms of parameters which more closely correspond to the manner in which humans perceive color. The most prominent perceptually-based standards for such representation are collectively referred to as the CIE system, which is promulgated by the International Commission on Illumination.
The "u'v'L*" space, for example, is a three dimensional space. The chromaticity of each point in this space is uniformly characterized by the parameters u' and v'. The third parameter, L*, denotes perceptually uniform variations in the lightness, (e.g., L*=0 is black, L*=full-scale is white). Luminance values in a u'v'L* representation will be noted by the symbol "L".
To process an image in the u'v'L space, the workstation maps each point u'.sub.0, v'.sub.0, L.sub.0 in the space to a new point u'.sub.1, v'.sub.1, L.sub.1. For example, if the user wishes to display the image on a monitor, he may need to adjust the image to compensate for bright lighting conditions of the room. Accordingly, the user may select a transform which maps each point u'.sub.0, v'.sub.0, L.sub.0 to a new point having the same values u'.sub.0, v'.sub.0 but having a greater luminance value L.sub.1.
One technique for tonal correction applied in the prior art consists of adjusting the pixels in an image in such a way that the shadows and highlights within the image are mapped to specific target values. These methods are useful in adjusting the overall brightness and dynamic range of an image; however, they are not effective at adjusting midtone gray levels.
U.S. Pat. No. 4,729,016 to Alkofer describes techniques for tonal correction using histograms. The Alkofer technique is based on two assumptions. First, an optimal tone reproduction curve for a natural image should remove all tonal remappings performed by the capture process, thereby restoring the tonality of the original scene. Second, the distribution of luminance values on edges within a natural scene should be Gaussian. Given these assumptions one could measure the actual tonal distribution on edges in an image, compare that distribution to a Gaussian distribution, and use the result of the comparison to "back out" the effects of the capture process.
To this end, the Alkofer technique generates histograms from a sample of tone and contrast values. The histogram producing the most normal tone distribution is chosen for the transformation function, and the function is applied to the grayscale value (in a black-and-white system) or to each component in the color space (in a color system).
In many cases one or both of these assumptions are not valid. Not all edges in all scenes have inherently Gaussian luminance distributions. Furthermore, in many color editing applications the goal is the production of a pleasing result rather than the recovery of the original scene appearance.